package com.xbongbong.pro.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author 吴峰
 * @date 2021/03/03 14:22
 */
@Setter
@Getter
@ToString
public class CustomButtonEntity implements Serializable {


    private static final long serialVersionUID = 192846980958357575L;
    private Long id;

    private String corpid;

    private Long formId;

    private Integer saasMark;

    private Integer businessType;


    private String name;

    private String icon;

    private String color;

    /**
     * @see com.xbongbong.pro.enums.lowcode.ButtonTypeEnum
     */
    private Integer type;

    private Integer sort;

    private String creatorId;

    private Long addTime;

    private Long updateTime;

    private Integer del;

    /**
     * 按钮下的动作，不要删除
     * 不用于插入，不用于更新
     */
    private List<CustomButtonActionEntity> actionList;


    public CustomButtonEntity() {
        this.del = DelEnum.NORMAL.getDel();
    }

    public CustomButtonEntity(String corpid, Long formId, Integer saasMark, Integer businessType,
                              String name, String icon, String color, Integer type, Integer sort, String creatorId, Long addTime, Long updateTime) {
        this.corpid = corpid;
        this.formId = formId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.name = name;
        this.icon = icon;
        this.color = color;
        this.type = type;
        this.sort = sort;
        this.creatorId = creatorId;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.del = DelEnum.NORMAL.getDel();
    }


    public CustomButtonEntity(Long id, String name, String icon, String color, Integer type, Integer sort, Long updateTime) {
        this.id = id;
        this.name = name;
        this.icon = icon;
        this.color = color;
        this.type = type;
        this.sort = sort;
        this.updateTime = updateTime;
    }
}
